/*
 * MemberList.h
 *
 *  Created on: Mar 24, 2010
 *      Author: mike
 */

//**************************************************************************
// File Name: MemberList.h
// Definition of MemberList class - a class that creates a list from
// GenericList and maintains a list of members to be used by MemberManager.
// "Group 3"
// CS 1C
// March 25, 2010
// Group Project: SuperWarehouse
// Due: March 25, 2010
// - KZ's comment
//**************************************************************************

#ifndef MEMBERLIST_H_
#define MEMBERLIST_H_

#include "Member.h"
#include "GenericList.h"
#include <time.h>
#include<fstream>

using namespace std;

struct temp		//MEMBER INFO STRUCT
{
	string mName;
	int mNum;
	char mType;
	string mExp;
};

class MemberList {
public:
	MemberList();
	virtual ~MemberList();
	void addMember(Member *m);
	void removeMember(Member *m);
	Member *findMemberById(int memberID);
	Member *retrieveMemberAtIndex(int idx);
	MemberList *findMembers(char memberType, time_t expStart, time_t expEnd);
	MemberList *listSortedByID();
	int getNumMembers();

	MemberList &operator=(const MemberList &rhs);

private:
	GenericList<Member> list;
};

#endif /* MEMBERLIST_H_ */
